package org.yaac.client;

import org.yaac.client.conf.YaacGinjector;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootLayoutPanel;

/**
 * @author Max Zhu (thebbsky@gmail.com)
 *
 */
// TODO : enable client side logging
// TODO : refactor to make one view can be mapped to different activities
public class YaacEntryPoint implements EntryPoint {

	/**
	 * Gin injector
	 */
	private final YaacGinjector injector = GWT.create(YaacGinjector.class);
	
	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {		
		RootLayoutPanel.get().add(injector.getShell());
		injector.getPlaceHistoryHandler().handleCurrentHistory();
	}
}
